<!DOCTYPE html>
<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
<!--[if IE 7 ]>    <html lang="en" class="no-js ie7"> <![endif]-->
<!--[if IE 8 ]>    <html lang="en" class="no-js ie8"> <![endif]-->
<!--[if IE 9 ]>    <html lang="en" class="no-js ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="en" class="no-js"><!--<![endif]-->
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<title><g:layoutTitle default="Ingressos"/></title>
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<link rel="shortcut icon" href="${resource(dir: 'images', file: 'favicon.ico')}" type="image/x-icon">
		<link rel="apple-touch-icon" href="${resource(dir: 'images', file: 'apple-touch-icon.png')}">
		<link rel="apple-touch-icon" sizes="114x114" href="${resource(dir: 'images', file: 'apple-touch-icon-retina.png')}">
		<link rel="stylesheet" href="${resource(dir: 'css', file: 'main.css')}" type="text/css">
		<link rel="stylesheet" href="${resource(dir: 'css', file: 'mobile.css')}" type="text/css">
		<g:layoutHead/>
		
		<g:javascript src="jquery/jquery.js"/>
		<g:javascript src="jquery/jquery.maskedinput.min.js"/>
		
		<r:layoutResources />
	</head>
	<body>
		<div id="grailsLogo" role="banner">
			<a href="/ingresso"><img src="${resource(dir: 'images', file: 'grails_logo.png')}" alt="Grails"/></a>
						
			<g:if test="${session.usuario}">				
				Olá, <b>${session.usuario.nome}</b>				
			</g:if>
														
		</div>
		
		<!-- Menu Usuário Cliente/Admin -->
		<div class="nav" role="navigation">
			<ul>
				<!--<g:each var="c" in="${grailsApplication.controllerClasses.sort { it.fullName } }">
					<li><g:link controller="${c.logicalPropertyName}">${c.logicalPropertyName}</g:link></li>
				</g:each>-->
							
				<li><a href="/ingresso">Home</a></li>			
							
				<g:if test="${session.usuario}">
					<g:if test="${session.usuario.tipoUsuario == 'Cliente'}">									
						<li><a href="/ingresso/avaliacao/index">Avaliação</a></li>							
						<!--<li><a href="/ingresso/evento/index">Evento</a></li>-->											
						<li><a href="/ingresso/contato/index">Contato</a></li>								
					</g:if>
					
					<g:if test="${session.usuario.tipoUsuario == 'Admin'}">
						<li><a href="/ingresso/usuario/index">Usuários</a></li>
						<li><a href="/ingresso/evento/list">Evento</a></li>
						<li><a href="/ingresso/categoria/index">Categoria</a></li>			
						<li><a href="/ingresso/cidade/index">Cidade</a></li>
						<li><a href="/ingresso/newslatter/index">Newslatter</a></li>
					</g:if>																										
				</g:if>
				<g:else>
					<li><a href="/ingresso/avaliacao/index">Avaliação</a></li>							
					<!--<li><a href="/ingresso/evento/index">Evento</a></li>-->												
					<li><a href="/ingresso/contato/index">Contato</a></li>
				</g:else>																					
												
				<li><a href="/ingresso/post/index" >Blog</a></li>
				
				<g:if test="${session.usuario}">
					<li><g:link action="minhaConta" controller="Usuario">Minha Conta</g:link></li>
					<li><g:link action="doLogout" controller="Login"><g:message code="default.logout.label" args="[entityName]" /></g:link></li>
				</g:if>
				<g:else>
					<li><g:link action="index" controller="Login"><g:message code="default.login.label" args="[entityName]" /></g:link></li>
				</g:else>
			</ul>					
		</div>
		<!-- /Menu Usuário Cliente/Admin -->				
		
		<g:layoutBody/>
		<div class="footer" role="contentinfo"></div>
		<div id="spinner" class="spinner" style="display:none;"><g:message code="spinner.alt" default="Loading&hellip;"/></div>		
		<g:javascript library="application"/>
		<r:layoutResources />
	</body>
</html>
